<?php
/*
Engineer: Derek Shue
Updated: 12/2/2011
Description: Displays information on volunteer requests associated with community partner. 

*/


 ?>
<h2>Service-Learning Course Volunteers</h2>
<p>
Students enrolled in designated service-learning classes combine academic coursework with community service. 
The service experience is directly linked to the content of their course. 
As a part of the course, students commit to serving 3-5 hours a week for 10 weeks with a specific community partner.
</p>
<ul>
    <li>
        <a href="<?php echo $this->url(array('controller'=>'partner','action'=>'browsevolunteers')) ?>">View Past Volunteer Positions</a>
    </li>
    <li>
	<a href="<?php echo $this->url(array('controller'=>'partner','action'=>'submitvolunteer')) ?>">Submit New Volunteer Position</a>
    </li>
</ul>
<?php if($this->positions):?>
<h3>Your current volunteer requests (edit by clicking position):</h3>
<table>
    <tr>
        <th>Position</th>
        <th>Term</th>
        <th>Positions Requested</th>
        <th>Action</th>
    </tr>
    <?php foreach($this->positions as $pos): ?>
    <tr>
        <td align="center"><a href="
		<?php echo $this -> url(array('controller' => 'partner', 'action' => 'volunteerdetails', 'position' => $pos['VRID']));?>
		"><?php echo $pos['POSITIONTITLE'] ?></a></td>
	<td align="center"><?php echo $pos['TERM'] ?></td>
        <td align="center"><?php echo $pos['NUMBERREQUESTING'] ?></td>	
        <td align="center"><a href="<?echo $this->url(array('controller'=>'partner','action'=>'deleterequest','position'=>$pos['VRID']));?>">Delete</a></td>
    </tr>
    <?php endforeach?>
<?php endif;?>
<?php if(!$this->positions):?>
	<h3>You have no current volunteer requests.</h3>
<?php endif;?>
</table>

